import request from '@/utils/request'

// 查询商家列表
export function listBusiness(query) {
  return request({
    url: '/PC/ZkwlBusinessPC/selectSaxuansj',
    method: 'get',
    params: query
  })
}
// 查询单个商家信息
export function getOneBusness(data) {
  return request({
    url: '/PC/ZkwlBusinessPC/selectOneshangjia',
    method: 'post',
    data: data
  })
}

// 新增商家列表 转为商家接口
export function addBusiness(data) {
  return request({
    url: '/PC/ZkwlBusinessPC/insertAllZkwlBusiness',
    method: 'post',
    data: data
  })
}

// 修改商家列表
export function updateBusiness(data) {
  return request({
    url: '/PC/ZkwlBusinessPC/updateZkwlBusinessPC',
    method: 'post',
    data: data
  })
}

// 商家列表删除账号
export function delBusiness(data) {
  return request({
    url: '/PC/ZkwlBusinessPC/deleteZkwlBusiness',
    method: 'post',
    data: data
  })
}
// 商家列表搜索
export function selectAllbusiness(data) {
  return request({
    url: '/PC/ZkwlBusinessPC/selectAllZkwlBusiness',
    method: 'post',
    data: data
  })
}
// 商家列表关闭账号
export function closeAccount(data) {
  return request({
    url: '/PC/ZkwlBusinessPC/updatezkwlBusinessUs',
    method: 'post',
    data: data
  })
}
// 商家客资信息
export function selectAllKZ(data) {
  return request({
    url: '/PC/ZkwlshopidUsers/selectAllSusers',
    method: 'post',
    data: data
  })
}
// 本店员工信息
export function selectUser(data) {
  return request({
    url: '/PC/ZkwlshopidUsers/selectAllSusers',
    method: 'post',
    data: data
  })
}
// 商家客资搜索
export function shopKzSearch(data) {
  return request({
    url: '/PC/ResoucesLogPC/selectResoucesLogPCs',
    method: 'post',
    data: data
  })
}
// 商家客资时间搜索
export function selectAllTimeKz(data) {
  return request({
    url: '/PC/ResoucesLogPC/selectAllTimeKz',
    method: 'post',
    data: data
  })
}
// 商家客资列表信息
export function selectAllKz(data) {
  return request({
    url: '/PC/ResoucesLogPC/selectAllKz',
    method: 'post',
    data: data
  })
}
// 客资列表跟进记录信息
export function selectjilu(data) {
  return request({
    url: '/PC/ResoucesLogPC/selectjilu',
    method: 'post',
    data: data
  })
}
// 客资列表订单成交
export function selectChengjiaoShop(data) {
  return request({
    url: '/PC/ResoucesLogPC/selectChengjiaoShop',
    method: 'post',
    data: data
  })
}
// 本店员工列表信息
export function selectAllSusers(data) {
  return request({
    url: '/PC/ZkwlshopidUsers/selectAllSusers',
    method: 'post',
    data: data
  })
}
// 本店员工搜索列表信息
export function selectAllshopUsers(data) {
  return request({
    url: '/PC/ZkwlshopidUsers/selectAllshopUsers',
    method: 'post',
    data: data
  })
}
//  充值
export function payment(data) {
  return request({
    url: '/PC/PCShoppaymentController/insertPCShoppaymentMapper',
    method: 'post',
    data: data
  })
}
//  商家消费明细
export function selectliushuiAllshop(data) {
  return request({
    url: '/wode/xiaofei/shaixuan',
    method: 'post',
    data: data
  })
}
// 商家登录新增员工
export function insertShopUsers(data) {
  return request({
    url: '/PC/ZkwlBusinessPC/insertShopUsers',
    method: 'post',
    data: data
  })
}
// 查询单个员工详情
export function getUser(data) {
  return request({
    url: '/PC/SysUserPCController/selectOneSysUserPC',
    method: 'post',
    data: data
  })
}
// 商家修改员工信息
export function updateShopSysUser(data) {
  return request({
    url: '/PC/ZkwlBusinessPC/updateShopSysUser',
    method: 'post',
    data: data
  })
}
// 商家客资导出
export function selectAllShopResourcesPC(data) {
  return request({
    url: '/PC/ResoucesLogPC/selectAllShopResourcesPC',
    method: 'post',
    data: data
  })
}
// 导出
export function daochuExcel(query) {
  return request({
    url: '/PC/ZkwlBusinessPC/daochuExcel',
    method: 'get',
    params: query
  })
}

//单个商家信息
export function getThisShop(id){
  return request({
    url: `/PC/ZkwlBusinessPC/getThisShop/${id}`,
    method: 'get',
  })
}

//获取商家客资
export function getThisShopKz(data){
  return request({
    url: `/PC/ZkwlBusinessPC/thisShopKz`,
    method: 'get',
    params:data,
  })
}

//本店员工
export function getThisShopUser(query){
  return request({
    url:'/PC/ZkwlBusinessPC/thisShopUser',
    method:'get',
    params:query,
  })
}

//客资跟进记录
export function getThisKzFollowRecord(query){
  return request({
    url:'/PC/ResoucesLogPC/selectjilu',
    method:'POST',
    data:query,
  })
}

//客资订单成交1
export function getThisShopKzOrder(kzId,shopId){
  return request({
    url:`/PC/ZkwlBusinessPC/getThisKzOrder/${kzId}/${shopId}`,
    method:'GET',
  })
}


